#ifndef DATAMODEL_H
#define DATAMODEL_H

#include <QAbstractTableModel>
#include <QVector>
#include "Seasons.h"

struct TableRow
{
    QString month;
    int days;
    int season;

    TableRow(){}

    TableRow(QString name, int num, int s)
    {
        month = name;
        days = num;
        season = s;
    }
};

class DataModel : public QAbstractTableModel
{
    Q_OBJECT

    QVector<TableRow> m_data;
    int cur;

    QVector<TableRow> filter(int seasons) const;

public:
    explicit DataModel(QObject *parent = 0);

    virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
    virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
    virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;

    void setSeason(int s);

signals:

public slots:

};

#endif // DATAMODEL_H
